const { dota2service } = require('../utils/request')

// 更新群信息
function updateRoomList(data) {
  return dota2service({
    url: '/system/updateRoomList',
    method: 'post',
    data
  })
}

// 获取聊天群组
function getChartRoomList() {
  return dota2service({
    url: '/system/getChartRoomList',
    method: 'get'
  })
}

// 获取监控群组
function getMonitorRoomList() {
  return dota2service({
    url: '/system/getMonitorRoomList',
    method: 'get'
  })
}

// 获取监控列表
function getMonitorMemberList(data) {
  return dota2service({
    url: '/system/getMonitorMemberList',
    method: 'post',
    data
  })
}

// 添加监控人员
function addMonitorMember(data) {
  return dota2service({
    url: '/system/addMonitorMember',
    method: 'post',
    data
  })
}

// 移除监控人员
function removeMonitorMember(data) {
  return dota2service({
    url: '/system/removeMonitorMember',
    method: 'delete',
    data
  })
}

// 清空监控人员
function clearMonitorMember(data) {
  return dota2service({
    url: '/system/clearMonitorMember',
    method: 'delete',
    data
  })
}

module.exports = {
  updateRoomList,
  getChartRoomList,
  getMonitorRoomList,
  getMonitorMemberList,
  addMonitorMember,
  removeMonitorMember,
  clearMonitorMember
}